<#assign prefixName = 'WHERE'>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__id??)>
	<#if (where__and__eq__id__value??)>
${prefixName} T.ID = :where__and__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__id__value??)>
${prefixName} T.ID <> :where__and__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__id__value??)>
${prefixName} T.ID = :where__or__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__id__value??)>
${prefixName} T.ID <> :where__or__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__message??)>
	<#if (where__and__eq__message__value??)>
${prefixName} T.MESSAGE = :where__and__eq__message__value
	<#else>
${prefixName} T.MESSAGE IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__message??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__message__value??)>
${prefixName} T.MESSAGE <> :where__and__nq__message__value
	<#else>
${prefixName} T.MESSAGE IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__message??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__message__value??)>
${prefixName} T.MESSAGE = :where__or__eq__message__value
	<#else>
${prefixName} T.MESSAGE IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__message??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__message__value??)>
${prefixName} T.MESSAGE <> :where__or__nq__message__value
	<#else>
${prefixName} T.MESSAGE IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__operatorDa??)>
	<#if (where__and__eq__operatorDa__value??)>
${prefixName} T.OPERATOR_DA = :where__and__eq__operatorDa__value
	<#else>
${prefixName} T.OPERATOR_DA IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__operatorDa??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__operatorDa__value??)>
${prefixName} T.OPERATOR_DA <> :where__and__nq__operatorDa__value
	<#else>
${prefixName} T.OPERATOR_DA IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__operatorDa??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__operatorDa__value??)>
${prefixName} T.OPERATOR_DA = :where__or__eq__operatorDa__value
	<#else>
${prefixName} T.OPERATOR_DA IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__operatorDa??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__operatorDa__value??)>
${prefixName} T.OPERATOR_DA <> :where__or__nq__operatorDa__value
	<#else>
${prefixName} T.OPERATOR_DA IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__operatorId??)>
	<#if (where__and__eq__operatorId__value??)>
${prefixName} T.OPERATOR_ID = :where__and__eq__operatorId__value
	<#else>
${prefixName} T.OPERATOR_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__operatorId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__operatorId__value??)>
${prefixName} T.OPERATOR_ID <> :where__and__nq__operatorId__value
	<#else>
${prefixName} T.OPERATOR_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__operatorId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__operatorId__value??)>
${prefixName} T.OPERATOR_ID = :where__or__eq__operatorId__value
	<#else>
${prefixName} T.OPERATOR_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__operatorId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__operatorId__value??)>
${prefixName} T.OPERATOR_ID <> :where__or__nq__operatorId__value
	<#else>
${prefixName} T.OPERATOR_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__entityId??)>
	<#if (where__and__eq__entityId__value??)>
${prefixName} T.ENTITY_ID = :where__and__eq__entityId__value
	<#else>
${prefixName} T.ENTITY_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__entityId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__entityId__value??)>
${prefixName} T.ENTITY_ID <> :where__and__nq__entityId__value
	<#else>
${prefixName} T.ENTITY_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__entityId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__entityId__value??)>
${prefixName} T.ENTITY_ID = :where__or__eq__entityId__value
	<#else>
${prefixName} T.ENTITY_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__entityId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__entityId__value??)>
${prefixName} T.ENTITY_ID <> :where__or__nq__entityId__value
	<#else>
${prefixName} T.ENTITY_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__code??)>
	<#if (where__and__eq__code__value??)>
${prefixName} T.CODE = :where__and__eq__code__value
	<#else>
${prefixName} T.CODE IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__code??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__code__value??)>
${prefixName} T.CODE <> :where__and__nq__code__value
	<#else>
${prefixName} T.CODE IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__code??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__code__value??)>
${prefixName} T.CODE = :where__or__eq__code__value
	<#else>
${prefixName} T.CODE IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__code??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__code__value??)>
${prefixName} T.CODE <> :where__or__nq__code__value
	<#else>
${prefixName} T.CODE IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
